﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TpData.Interfaces;
using TpData.Properties;

namespace TpData.Manager {
    public static class DataManager {

        public static IDataLayer CreateDataLayer(Type type) {
            IDataLayer datalayer = (Activator.CreateInstance(type) as IDataLayer);
            if (datalayer != null) {
                string conString = Settings.Default.ConnectionString;
                datalayer.Initialize(conString);
            }
            return datalayer;
        }
    }
}
